package com.pfa.test.metier;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.pfa.test.dao.IClientDao;
import com.pfa.test.entities.ClientDsi;
import com.pfa.test.entities.DemandeReparation;
import com.pfa.test.entities.Materiel;
import com.pfa.test.entities.Panne;

@Transactional
public class ClientMetierImpl implements IClientMetier {

	private IClientDao dao;
		
	
	public void setDao(IClientDao dao) {
		this.dao = dao;
	}

	@Override
	public void ajouterReparation(DemandeReparation dr) {
		// TODO Auto-generated method stub
		dao.ajouterReparation(dr);
	}

	@Override
	public List<DemandeReparation> listReparation(Long idClient) {
		// TODO Auto-generated method stub
		return dao.listReparation(idClient);
	}

	@Override
	public DemandeReparation getReparation(Long idRep) {
		// TODO Auto-generated method stub
		return dao.getReparation(idRep);
	}

	@Override
	public void supprimerReparation(DemandeReparation rep) {
		// TODO Auto-generated method stub
		dao.supprimerReparation(rep);
	}

	@Override
	public void modiferReparation(DemandeReparation dmd) {
		// TODO Auto-generated method stub
		dao.modiferReparation(dmd);
	}

	@Override
	public ClientDsi getClient(String cin) {		
		return dao.getClient(cin);
	}
	public List<Materiel> listMateriel(){
		return dao.listMateriel();
	}
	public List<Panne> listPanne(){
		return dao.listPanne();
	}

	@Override
	public Materiel getMaterielByType(String type) {
		return dao.getMaterielByType(type);
	}

	@Override
	public Panne getPanneByType(String type) {
		return dao.getPanneByType(type);
	}
	
}
